#pragma once

namespace GeneralCtrl
{
class PositionPID
{
  public:
    PositionPID(double P = 0, double I = 0, double D = 0);
    void SetP(double value);
    void SetI(double value);
    void SetD(double value);
    void SetPID(double p, double i, double d);
    double GetControl(double error, double timeDelta);

  private:
    double P, I, D;
    double errorSum = 0;
    double lastError = 0;
};
} // namespace GeneralCtrl
